import {config, request} from 'utils'

const {api} = config
const {user, userLogout, userLogin} = api

export function login (params) {
  params.timestamp = new Date().getTime()

  return request({
    url: userLogin,
    method: 'post',
  })
}

export function logout (params) {
  return request({
    url: userLogout,
    method: 'post',
    data: params,
  })
}

export function query (params) {
  return request({
    url: user,
    method: 'get',
    data: params,
  })
}
